package com.cloudbroker.bcs.platform.ltb.middle.service;

import com.cloudbroker.bcs.common.service.base.ServiceBase;
import com.cloudbroker.bcs.platform.ltb.bizapi.constants.type.UserType;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.admin.vo.UserQueryForm;
import com.cloudbroker.bcs.platform.ltb.middle.entity.UserEntity;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIConversion;

import java.util.List;
import java.util.Map;

/**
 * Created by tianrui on 2016/7/5.
 */
public interface UserService extends ServiceBase<UserEntity,String> {

    /**
     *  用户登录--用户名与密码校验
     *  @param userEntity
     *  @return  boolean
     * */
    public UserEntity userLoginVerify(UserEntity userEntity);

    /**
     *  获取登录账户id
     *  @param userEntity
     *  @return  long
     * */
    public long getAccountID(UserEntity userEntity);


    /**
     * 密码重置
     * */
    public int restPassword(UserEntity userEntity);

    /**
     *  更新密码
     *  @param userEntity
     *  @return
     * */
    public void updatePassword(UserEntity userEntity);


    /**
     *  获取用户信息
     *  @param userEntity
     *  @return
     * */
    public UserEntity getUserEntity(UserEntity userEntity);

    /**
     * 新增user数据
     * */
    public void addUser(UserEntity userEntity);

    /**
     * 用户登录状态获取
     * */
    public String getUserStatus(UserEntity userEntity);

    /**
     * 用户头像修改
     * */
    public void updateUserAvatar(UserEntity userEntity);

    /**
     * 用户昵称修改
     * */
    public void updateUserAliasName(UserEntity userEntity);

    /**
     * 更新用户状态
     * */
    public void updateUserStatus(UserEntity userEntity);


    public List<UserEntity> queryByName(UserQueryForm form);

    /**
     * 更新用户登录时间
     * */
    public void updateUserLoginTime(UserEntity userEntity);

    /**
     * 根据id获取头像
     * @param idList
     * @return
     */
    List<UserEntity> getUserList(List<Long> idList);


    public void updateID(Long new_id, Long user_id);

    public void updateInviteNum(UserEntity userEntity);

    public UserEntity findByInviteCode(UserEntity userEntity);

    public void updateOpenId(UserEntity userEntity);

    void updateAnswerNum(UserEntity leader);
}
